#ifndef CONFIG_H
#define CONFIG_H

#define NUMBEROFBOTTLES 14

#include <QString>
#include <QDebug>
#include <QDateTime>
#include <QFile>


class Config
{
public:
    Config();
    Config( const Config& other );
    Config& operator=( const Config& other );

    void initAllArrays();
    void setProjectName(QString prName);
    void setActiveBottles(bool* actBottles);
    void setVolumeBottle(float* bVolume);
    void setVolumeSludge(float* bVolume);
    void setVolumeSubstrate(float* bVolume);
    void setBottleGroupNames(QString *names);
    void setLowerCalibrationValue(int connector, float voltValue, float pressure);
    void setUpperCalibrationValue(int connector, float voltValue, float pressure);
    void writeConfigToFile();
    void appendCalibrationToConfigFile();
    void calculateCalibration();

    QString getProjectName();
    bool* getActiveBottles();
    float* getVolumeBottle();
    float* getVolumeSludge();
    float* getVolumeSubstrate();
    QString* getBottleGroupNames();
    float *getMultiplicator();
    float *getOffset();



private:

    QFile *file;
    QTextStream *out;


    QString projectName;
    QDateTime createdTime;
    bool activeBottles[NUMBEROFBOTTLES];
    float volumeBottles[NUMBEROFBOTTLES];
    float volumeSludge[NUMBEROFBOTTLES];
    float volumeSubstrate[NUMBEROFBOTTLES];
    QString bottleGroupNames[4];
    float calibrationMultiplicator[NUMBEROFBOTTLES];
    float calibrationOffset[NUMBEROFBOTTLES];

    float lowerCalValue[NUMBEROFBOTTLES];
    float upperCalValue[NUMBEROFBOTTLES];

    float lowerCalPressure[NUMBEROFBOTTLES];
    float upperCalPressure[NUMBEROFBOTTLES];


};

#endif // Config_H
